using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;

// SMO namespaces
using Microsoft.SqlServer.Management.Common;
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer;

namespace SQLAnalyzer.Framework
{
   public static class ServerHelper
    {
       public static DataTable GetLocalServerList()
        {
            DataTable serverList;

            // Set local server as default
            return serverList = SmoApplication.EnumAvailableSqlServers(true);
        }

       public static DataTable GetNetworkServerList()
       {
           DataTable serverList;

           // Set local server as default
           return serverList = SmoApplication.EnumAvailableSqlServers(false);
       }

    }
}
